package com.slaffka.model.notification;

import com.slaffka.model.NotificationType;

import javax.persistence.Entity;
import javax.persistence.Table;

/**
 * Created by IntelliJ IDEA.
 * User: v.tsapaev
 * Date: 24.02.12
 * Time: 1:21
 * To change this template use File | Settings | File Templates.
 */
@Entity
//@DiscriminatorValue("Message")
@Table(name = "message")

public class Message extends Notification {
    
    private String title;
    
    private String text;

//    @Column(name = "notification_type")
//    private NotificationType notificationType = NotificationType.MESSAGE;
    public Message(){
        super.notificationType = NotificationType.MESSAGE;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getText() {
        return text;
    }

    public void setText(String text) {
        this.text = text;
    }

    @Override
    public String toString() {
        return "Message{" +
                "notificationId=" + notificationId + '\'' +
                ", notificationType=Message" + '\'' +
                ", owner='" + owner + '\'' +
                ", targetUsers='" + targetUsers + '\'' +
                ", title='" + title + '\'' +
                ", text='" + text + '\'' +
                '}';
    }
}
